package cn.dansj.handler.interfaces;

import cn.dansj.annotation.MarkAsApi;
import cn.dansj.common.utils.transfer.Verification;
import cn.dansj.handler.InterfaceHandler;

import java.util.Map;

@MarkAsApi
public class EdgePicture extends InterfaceHandler {
    private static final String select = "select * from x_edge_component where component in ('picture')";
    private static final String delete = "delete from x_edge_component where component in ('picture') and id=?";

    @Override
    public Object execute(Map<String, Object> paramsMap) {
        Object id = paramsMap.get("id");
        if (Verification.checkNotNull(id)) jdbcTemplate.update(delete, id);
        return jdbcTemplate.queryForList(select);
    }
}